package com.example.linuxchat.bean;

/**
 * @author liulingjie
 * @date 20-6-18 下午4:29
 */
public class ChatMessage {
    private Integer number;
    private String id;
    private String name;
    private String content;
    private String time;
    private String imageUrl;

    public ChatMessage(){}
    public ChatMessage(Integer number, String id, String name, String content, String time, String imageUrl) {
        this.number = number;
        this.id = id;
        this.name = name;
        this.content = content;
        this.time = time;
        this.imageUrl = imageUrl;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String toMessage(){
        return "2`"+id+"#"+name+"#"+content+"#"+time+"#"+imageUrl;
    }

    @Override
    public String toString() {
        return "ChatMessage{" +
                "number=" + number +
                ", id='" + id + '\'' +
                ", name='" + name + '\'' +
                ", content='" + content + '\'' +
                ", time='" + time + '\'' +
                ", imageUrl='" + imageUrl + '\'' +
                '}';
    }

}
